from selenium import webdriver
from selenium.webdriver.common.by import By

driver = webdriver.Chrome()
driver.get('https://www.baidu.com/')
driver.maximize_window()

case = driver.find_element(By.CSS_SELECTOR, 'form[id="form"] input')
print(case.get_attribute('outerHTML'))  # 打印的是第一个input标签

driver.quit()